<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Matrix207&#39;s Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta property="og:type" content="website">
<meta property="og:title" content="Matrix207's Blog">
<meta property="og:url" content="http://yoursite.com/page/13/index.html">
<meta property="og:site_name" content="Matrix207's Blog">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Matrix207's Blog">
  
    <link rel="alternate" href="/atom.xml" title="Matrix207&#39;s Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Matrix207&#39;s Blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="Flux RSS"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Rechercher"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main">
  
    <article id="post-c-thread-pool" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/05/28/c-thread-pool/" class="article-date">
  <time datetime="2013-05-27T16:00:00.000Z" itemprop="datePublished">2013-05-28</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/language/">language</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/05/28/c-thread-pool/">c thread pool</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>reference:  </p>
<ul>
<li><a href="https://github.com/mbrossard/threadpool" target="_blank" rel="external">threadpool</a></li>
<li><a href="https://github.com/Pithikos/C-Thread-Pool" target="_blank" rel="external">C Thread Pool</a></li>
<li><a href="http://bbs.chinaunix.net/thread-580210-1-1.html" target="_blank" rel="external">c threadpool</a></li>
<li><a href="http://blog.csdn.net/zouxinfox/article/details/3560891" target="_blank" rel="external">一个Linux下C线程池的实现</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/05/28/c-thread-pool/" data-id="ciqqpe1k80058nmpvcewlax4y" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/c/">c</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-linux-kernel-linked-list-explained" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/05/28/linux-kernel-linked-list-explained/" class="article-date">
  <time datetime="2013-05-27T16:00:00.000Z" itemprop="datePublished">2013-05-28</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/linux/">linux</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/05/28/linux-kernel-linked-list-explained/">Linux Kernel Linked List Explained</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>Using the list:</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

#include &quot;list.h&quot;

struct kool_list{
    int to;
    struct list_head list;
    int from;
    };

int main(int argc, char **argv){
    struct kool_list *tmp;
    struct list_head *pos, *q;
    unsigned int i;

    struct kool_list mylist;
    INIT_LIST_HEAD(&amp;mylist.list);

    for(i=5; i!=0; --i){
        tmp=(struct kool_list*)malloc(sizeof(struct kool_list));
        printf(&quot;enter to and from:&quot;);
        scanf(&quot;%d %d&quot;, &amp;tmp-&gt;to, &amp;tmp-&gt;from);
        list_add(&amp;(tmp-&gt;list), &amp;(mylist.list));
    }
    printf(&quot;\n&quot;);

    printf(&quot;traversing the list using list_for_each_entry()\n&quot;);
    list_for_each_entry(tmp, &amp;mylist.list, list)
        printf(&quot;to=%d from=%d\n&quot;, tmp-&gt;to, tmp-&gt;from);
    printf(&quot;\n&quot;);

    printf(&quot;deleting the list using list_for_each_safe()\n&quot;);
    list_for_each_safe(pos, q, &amp;mylist.list){
        tmp=list_entry(pos, struct kool_list, list);
        printf(&quot;freeing item to=%d from=%d\n&quot;, tmp-&gt;to, tmp-&gt;from);
        list_del(pos);
        free(tmp);
    }

    return 0;
}
</code></pre><p>Testing, as below:</p>
<pre><code>[dennis@localhost test]$ ./main
enter to and from:19 9
enter to and from:18 8
enter to and from:17 7
enter to and from:16 6
enter to and from:15 5

traversing the list using list_for_each_entry()
to=15 from=5
to=16 from=6
to=17 from=7
to=18 from=8
to=19 from=9

deleting the list using list_for_each_safe()
freeing item to=15 from=5
freeing item to=16 from=6
freeing item to=17 from=7
freeing item to=18 from=8
freeing item to=19 from=9
[dennis@localhost test]$
</code></pre><p>How it work? go to the reference website for detail.</p>
<p>Reference:</p>
<ul>
<li><a href="http://isis.poly.edu/kulesh/stuff/src/klist/" target="_blank" rel="external">Linux Kernel Linked List Explained</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/05/28/linux-kernel-linked-list-explained/" data-id="ciqqpe1kb005bnmpv60u2dqvp" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/kernel/">kernel</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-skill-of-c" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/05/21/skill-of-c/" class="article-date">
  <time datetime="2013-05-20T16:00:00.000Z" itemprop="datePublished">2013-05-21</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/language/">language</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/05/21/skill-of-c/">The Art of C Programming</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>##1. Principle </p>
<ul>
<li><strong>Array is NOT point</strong></li>
<li><strong>Avoid using unsafe api</strong></li>
<li><strong>Deeply understand point</strong></li>
</ul>
<p>##2. math</p>
<h3 id="2-1-mod"><a href="#2-1-mod" class="headerlink" title="2.1 mod"></a>2.1 mod</h3><pre><code>if n%2k=x, then x=n&amp;(2k-1)
</code></pre><h3 id="2-2-even-odd-check"><a href="#2-2-even-odd-check" class="headerlink" title="2.2 even odd check"></a>2.2 even odd check</h3><p>if the lowest bit of binary mode is 0, even number, otherwise odd.</p>
<h3 id="2-3-multi"><a href="#2-3-multi" class="headerlink" title="2.3 multi"></a>2.3 multi</h3><pre><code>a*5 = a&lt;&lt;2+a
</code></pre><p>##3.structure</p>
<h3 id="3-1-size"><a href="#3-1-size" class="headerlink" title="3.1 size"></a>3.1 size</h3><pre><code>int arr[] = {1, 5, 3, 18, 107, 21, 88};

size of arr is sizeof(arr)/sizeof(arr[0])

struct _test_ {
    int a;
    double b;
    char c;
}

size of _test_ is sizeof(_test_)
</code></pre><p>##4. Puzzle</p>
<h3 id="4-1-Print-the-numbers-between-1-and-1000"><a href="#4-1-Print-the-numbers-between-1-and-1000" class="headerlink" title="4.1 Print the numbers between 1 and 1000."></a>4.1 Print the numbers between 1 and 1000.</h3><ul>
<li>Add a rule: Don’t use any loops.</li>
<li>Add another rule: No recursions.</li>
<li>We can’t do that? OK. Please look at this one.</li>
</ul>
<pre>
#include "stdio.h"
#define A(x) x;x;x;x;x;x;x;x;x;x;
int main (void){
  int n = 1;
  A(A(A(printf ("%d ", n++))));
  return 0;
}
</pre>

<h3 id="4-2-swap-two-variables"><a href="#4-2-swap-two-variables" class="headerlink" title="4.2 swap two variables"></a>4.2 swap two variables</h3><pre><code>a = a^b;
b = a^b;
a = a^b;
</code></pre><p>##5. What we need to avoid using?</p>
<ul>
<li>gets –&gt; fgets</li>
<li>scanf –&gt; scanf_s sscanf</li>
<li>sprintf –&gt; snprintf sprintf_s</li>
<li>strcpy –&gt; strlcpy</li>
<li>strcat –&gt; strlcat</li>
<li>strtok –&gt; strtok_r</li>
</ul>
<p>##6. v[index] and index[v] are the same</p>
<p>##7. use _Generic macro</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

void printchar(char X) { printf(&quot;char: %c\n&quot;, X); }
void printint(int X) { printf(&quot;int: %d\n&quot;, X); }
void printfloat(float X) { printf(&quot;float: %f\n&quot;, X); }
void printdouble(double X) { printf(&quot;double: %lf\n&quot;, X); }
#define print(X) _Generic((X), \
                               char: printchar, \
                               int: printint, \
                               float: printfloat, \
                               double: printdouble)(X)

int main()
{
    print(1);
    print(1.2);
    print((char)&apos;a&apos;);
    return 0;
}
</code></pre><p>GCC version don’t support _Generic macro currently, but clang work.<br>Compile this code with clang as <code>clang test.c</code></p>
<p>##8. Reference  </p>
<ul>
<li><a href="https://www.kernel.org/" target="_blank" rel="external">Linux kernel source</a></li>
<li><a href="http://wangcong.org/down/taoc.ppt" target="_blank" rel="external">The Art of C Programming</a></li>
<li><a href="http://sathyamvellal.in/blog/cool-c-programming/?d=5" target="_blank" rel="external">cool c programming</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/05/21/skill-of-c/" data-id="ciqqpe1k50055nmpv3tyz473m" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/c/">c</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-windows-event-log" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/05/09/windows-event-log/" class="article-date">
  <time datetime="2013-05-08T16:00:00.000Z" itemprop="datePublished">2013-05-09</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/windows/">windows</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/05/09/windows-event-log/">windows event log</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="1-Introduce"><a href="#1-Introduce" class="headerlink" title="1. Introduce"></a>1. Introduce</h2><p>Application can use the Event logging API to report and view events.<br>For details on reporting events, see Reporting Events.<br>To view events that have been written to log files, see Querying for Event Source Messages<br>and Receiving Event Notification. </p>
<p>You can find widows event log files(binary file) on C:\WINDOWS\system32\config\, list as below:</p>
<pre><code>C:\WINDOWS\system32\config\AppEvent.Evt
C:\WINDOWS\system32\config\SecEvent.Evt
C:\WINDOWS\system32\config\SysEvent.Evt
</code></pre><h2 id="2-Program"><a href="#2-Program" class="headerlink" title="2. Program"></a>2. Program</h2><h3 id="2-1-Prepare-work"><a href="#2-1-Prepare-work" class="headerlink" title="2.1 Prepare work"></a>2.1 Prepare work</h3><h4 id="2-1-1-Write-a-message-text-file-name-provider-mc-the-follow-show-it"><a href="#2-1-1-Write-a-message-text-file-name-provider-mc-the-follow-show-it" class="headerlink" title="2.1.1 Write a message text file, name provider.mc, the follow show it"></a>2.1.1 Write a message text file, name provider.mc, the follow show it</h4><pre><code>; // MyEventProvider.mc 

; // This is the header section.


SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
               Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
               Warning=0x2:STATUS_SEVERITY_WARNING
               Error=0x3:STATUS_SEVERITY_ERROR
              )


FacilityNames=(System=0x0:FACILITY_SYSTEM
               Runtime=0x2:FACILITY_RUNTIME
               Stubs=0x3:FACILITY_STUBS
               Io=0x4:FACILITY_IO_ERROR_CODE
              )

LanguageNames=(English=0x409:MSG00409)


; // The following are the categories of events.

MessageIdTypedef=WORD

MessageId=0x1
SymbolicName=NETWORK_CATEGORY
Language=English
Network Events
.

MessageId=0x2
SymbolicName=DATABASE_CATEGORY
Language=English
Database Events
.

MessageId=0x3
SymbolicName=UI_CATEGORY
Language=English
UI Events
.


; // The following are the message definitions.

MessageIdTypedef=DWORD

MessageId=0x100
Severity=Error
Facility=Runtime
SymbolicName=MSG_INVALID_COMMAND
Language=English
The command is not valid.
.


MessageId=0x101
Severity=Error
Facility=System
SymbolicName=MSG_BAD_FILE_CONTENTS
Language=English
File %1 contains content that is not valid.
.

MessageId=0x102
Severity=Warning
Facility=System
SymbolicName=MSG_RETRIES
Language=English
There have been %1 retries with %2 success! Disconnect from
the server and try again later.
.

MessageId=0x103
Severity=Informational
Facility=System
SymbolicName=MSG_COMPUTE_CONVERSION
Language=English
%1 %%4096 = %2 %%4097. 
.


; // The following are the parameter strings */


MessageId=0x1000
Severity=Success
Facility=System
SymbolicName=QUARTS_UNITS
Language=English
quarts%0
.

MessageId=0x1001
Severity=Success
Facility=System
SymbolicName=GALLONS_UNITS
Language=English
gallons%0
.
</code></pre><p>Use the following command to compile the message text file:</p>
<pre><code>mc -U provider.mc
</code></pre><p>It will generate 3 files: (the report event project use provider.h)</p>
<pre><code>provider.h
provider.rc
MSG0409.bin
</code></pre><p>Compile the resources file:</p>
<pre><code>rc provider.rc
</code></pre><p>Generate only one file, provider.res</p>
<p>Last use link to create resource-dll file:</p>
<pre><code>link -dll -noentry provider.res
</code></pre><p>Output file, provider.dll, with these library, event log viewer can show the<br>the detail description by ID, Type … etc.(at the follow, Receiving event<br>notification use thid library)</p>
<h3 id="2-2-Report-event-log"><a href="#2-2-Report-event-log" class="headerlink" title="2.2 Report event log"></a>2.2 Report event log</h3><p>An example show how to report event.<br>Create a win32 console project, with empty file.<br>Then, add a reportevent.cpp to it, and add the follow code.</p>
<pre><code>#ifndef UNICODE
#define UNICODE
#endif
#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &quot;provider.h&quot;

#pragma comment(lib, &quot;advapi32.lib&quot;)

#define PROVIDER_NAME L&quot;MyEventProvider&quot;

// Hardcoded insert string for the event messages.
CONST LPWSTR pBadCommand = L&quot;The command that was not valid&quot;;
CONST LPWSTR pFilename = L&quot;c:\\folder\\file.ext&quot;;
CONST LPWSTR pNumberOfRetries = L&quot;3&quot;;
CONST LPWSTR pSuccessfulRetries = L&quot;0&quot;;
CONST LPWSTR pQuarts = L&quot;8&quot;;
CONST LPWSTR pGallons = L&quot;2&quot;;

void wmain(void)
{
    HANDLE hEventLog = NULL;
    LPWSTR pInsertStrings[2] = {NULL, NULL};
    DWORD dwEventDataSize = 0;

    // The source name (provider) must exist as a subkey of Application.
    hEventLog = RegisterEventSource(NULL, PROVIDER_NAME);
    if (NULL == hEventLog)
    {
        wprintf(L&quot;RegisterEventSource failed with 0x%x.\n&quot;, GetLastError());
        goto cleanup;
    }

    // This event includes user-defined data as part of the event. The event message
    // does not use insert strings.
    dwEventDataSize = ((DWORD)wcslen(pBadCommand) + 1) * sizeof(WCHAR);
    if (!ReportEvent(hEventLog, EVENTLOG_ERROR_TYPE, UI_CATEGORY, MSG_INVALID_COMMAND, NULL, 0, dwEventDataSize, NULL, pBadCommand))
    {
        wprintf(L&quot;ReportEvent failed with 0x%x for event 0x%x.\n&quot;, GetLastError(), MSG_INVALID_COMMAND);
        goto cleanup;
    }

    // This event uses insert strings.
    pInsertStrings[0] = pFilename;
    if (!ReportEvent(hEventLog, EVENTLOG_ERROR_TYPE, DATABASE_CATEGORY, MSG_BAD_FILE_CONTENTS, NULL, 1, 0, (LPCWSTR*)pInsertStrings, NULL))
    {
        wprintf(L&quot;ReportEvent failed with 0x%x for event 0x%x.\n&quot;, GetLastError(), MSG_BAD_FILE_CONTENTS);
        goto cleanup;
    }

    // This event uses insert strings.
    pInsertStrings[0] = pNumberOfRetries;
    pInsertStrings[1] = pSuccessfulRetries;
    if (!ReportEvent(hEventLog, EVENTLOG_WARNING_TYPE, NETWORK_CATEGORY, MSG_RETRIES, NULL, 2, 0, (LPCWSTR*)pInsertStrings, NULL))
    {
        wprintf(L&quot;ReportEvent failed with 0x%x for event 0x%x.\n&quot;, GetLastError(), MSG_RETRIES);
        goto cleanup;
    }

    // This event uses insert strings.
    pInsertStrings[0] = pQuarts;
    pInsertStrings[1] = pGallons;
    if (!ReportEvent(hEventLog, EVENTLOG_INFORMATION_TYPE, UI_CATEGORY, MSG_COMPUTE_CONVERSION, NULL, 2, 0, (LPCWSTR*)pInsertStrings, NULL))
    {
        wprintf(L&quot;ReportEvent failed with 0x%x for event 0x%x.\n&quot;, GetLastError(), MSG_COMPUTE_CONVERSION);
        goto cleanup;
    }

    wprintf(L&quot;All events successfully reported.\n&quot;);

cleanup:

    if (hEventLog)
        DeregisterEventSource(hEventLog);
}
</code></pre><h3 id="2-3-View-event-log"><a href="#2-3-View-event-log" class="headerlink" title="2.3 View event log"></a>2.3 View event log</h3><p>go to <a href="http://msdn.microsoft.com/en-us/library/aa363677(v=vs.85).aspx" target="_blank" rel="external">http://msdn.microsoft.com/en-us/library/aa363677(v=vs.85).aspx</a><br>get the source code of “Receiving Event Notification”.</p>
<p>Notice that, change these two lines for your apply:  </p>
<pre><code>#define PROVIDER_NAME L&quot;MyEventProvider&quot;
#define RESOURCE_DLL  L&quot;&lt;path&gt;\\Provider.dll&quot;
</code></pre><h2 id="3-Questions"><a href="#3-Questions" class="headerlink" title="3. Questions"></a>3. Questions</h2><p>How to monitor multi event logs? And make it to be a component.<br>I want to implement it, on this site you can find a first version project<br><a href="https://github.com/matrix207/VC/tree/master/eventlog/EventLogMonitor" target="_blank" rel="external">Click here</a></p>
<p>But I think, it was a pool method to check each event name. Is there exist any<br>good method to do it? I meet the same problem with this guy,<br><a href="http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/2c0d8708-4d07-47f9-87f4-c3f7141b55fd" target="_blank" rel="external">Unexpected behavior of WaitForMultipleObjects for events used in NotifyChangeEventLog</a><br>I’m sad, why he don’t told the detail info.</p>
<h2 id="4-Reference"><a href="#4-Reference" class="headerlink" title="4. Reference"></a>4. Reference</h2><ul>
<li><a href="http://msdn.microsoft.com/en-us/library/aa363681%28v=vs.85%29.aspx" target="_blank" rel="external">Using Event Logging</a></li>
<li>Reporting Events: <a href="http://msdn.microsoft.com/en-us/library/aa363680(v=vs.85).aspx" target="_blank" rel="external">http://msdn.microsoft.com/en-us/library/aa363680(v=vs.85).aspx</a></li>
<li>Receiving Event Notification: <a href="http://msdn.microsoft.com/en-us/library/aa363677(v=vs.85).aspx" target="_blank" rel="external">http://msdn.microsoft.com/en-us/library/aa363677(v=vs.85).aspx</a></li>
<li><a href="http://angusj.com/resourcehacker/" target="_blank" rel="external">resource</a> a freeware utility to view, modify, rename,<br>add delete and extract resources in 32bit &amp; 64bit windows executable and resource files</li>
<li><a href="http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/2c0d8708-4d07-47f9-87f4-c3f7141b55fd" target="_blank" rel="external">Unexpected behavior of WaitForMultipleObjects for events used in NotifyChangeEventLog</a></li>
<li>SNARE Auditing and EventLog Management: <http: sourceforge.net="" projects="" snare="" files="" for="" windows=""></http:></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/05/09/windows-event-log/" data-id="ciqqpe1k20052nmpv4cgr92t6" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/windows/">windows</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-network-client-server-model" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/05/09/network-client-server-model/" class="article-date">
  <time datetime="2013-05-08T16:00:00.000Z" itemprop="datePublished">2013-05-09</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/network/">network</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/05/09/network-client-server-model/">network client server model</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>##Some words before<br>On this paper, I want to tell a story of network client server model. I would<br>do it on the coming weeks(^_^). Let’s waiting…</p>
<p>##Reference:</p>
<ul>
<li><a href="http://blog.chinaunix.net/uid-24148050-id-3195151.html" target="_blank" rel="external">http://blog.chinaunix.net/uid-24148050-id-3195151.html</a></li>
<li><a href="http://daniel.haxx.se/docs/poll-vs-select.html" target="_blank" rel="external">poll vs select vs event-based </a></li>
<li><a href="http://www.cppblog.com/feixuwu/archive/2010/07/10/119995.html" target="_blank" rel="external">select 和 epoll</a></li>
<li><a href="http://zhhzhh-43.blog.163.com/blog/static/12669737120129195459299/" target="_blank" rel="external">linux通讯socket模型select,epoll,poll比较</a></li>
<li><a href="http://blog.endlesscode.com/2010/03/27/select-poll-epoll-intro/" target="_blank" rel="external">select、poll和epoll</a></li>
<li><a href="http://blog.chinaunix.net/uid-24148050-id-3195151.html" target="_blank" rel="external">服务器模型</a></li>
<li><a href="http://www.tenouk.com/Module39.html" target="_blank" rel="external">NETWORK PROGRAMMING LINUX SOCKET PART I: THE FUNDAMENTALS</a></li>
<li><a href="http://www.tutorialspoint.com/unix_sockets/client_server_model.htm" target="_blank" rel="external">Client Server Model - Architecture</a></li>
<li><a href="http://www.tutorialspoint.com/unix_sockets/socket_server_example.htm" target="_blank" rel="external">Socket Server Examples</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/05/09/network-client-server-model/" data-id="ciqqpe1jz004znmpvz3r4np8c" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/network/">network</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-early-linux-kernel-analyze" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/05/08/early-linux-kernel-analyze/" class="article-date">
  <time datetime="2013-05-07T16:00:00.000Z" itemprop="datePublished">2013-05-08</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/linux/">linux</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/05/08/early-linux-kernel-analyze/">Early Linux Kernel Analyze</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>##Reference</p>
<ul>
<li><a href="http://www.oldlinux.org/" target="_blank" rel="external">OldLinux</a></li>
<li><a href="http://oldlinux.org/Linux.old/" target="_blank" rel="external">Index of /Linux.old</a></li>
<li><a href="http://oldlinux.org/Linux.old/study/Ref-docs/Linux0.11CodeAnalisysV1.0.pdf" target="_blank" rel="external">Linux 0.11 Code Analisys V1.0</a></li>
<li><a href="https://www.kernel.org/pub/linux/kernel/v1.0/" target="_blank" rel="external">kernel 1.0</a></li>
<li><a href="http://www.oldlinux.org/download/clk011c-3.0.pdf" target="_blank" rel="external">Linux内核完全注释 V3.0</a></li>
<li><a href="http://www.oldlinux.org/oldlinux/viewthread.php?tid=2551&amp;extra=page=1" target="_blank" rel="external">阅读本书所需的基础知识</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/05/08/early-linux-kernel-analyze/" data-id="ciqqpe1jv004wnmpvcic5gp35" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/kernel/">kernel</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-do-you-really-master-c-language" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/05/07/do-you-really-master-c-language/" class="article-date">
  <time datetime="2013-05-06T16:00:00.000Z" itemprop="datePublished">2013-05-07</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/language/">language</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/05/07/do-you-really-master-c-language/">Do you really master c language</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>##1. Array</p>
<ol>
<li><p>Two dimensional array:<br>If you have an 2-d array like <code>char buf[50][255] = {0};</code>, and use it for function </p>
<p> void test(char *buf[])<br> {</p>
<pre><code>printf(&quot;buf[0] = %s\n&quot;, buf[0]);
</code></pre><p> }</p>
</li>
</ol>
<p>It would appear warning as below:  </p>
<pre><code>[dennis@localhost test]$ gcc -o t t.c
t.c: In function ‘main’:
t.c:179:2: warning: passing argument 1 of ‘test’ from incompatible pointer type [enabled by default]
t.c:146:6: note: expected ‘char **’ but argument is of type ‘char (*)[255]’
</code></pre><p>The correct function format is : <code>void test(char (*buf)[255])</code></p>
<ol>
<li><p>Array initial:</p>
<p> /<em> This code is from strace’s source code </em>/<br> /<em> strace is tool use for trace all the system call of linux binary </em>/<br> #include <stdio.h><br> #include <stdlib.h></stdlib.h></stdio.h></p>
<p> #define PTRACE_EVENT_CLONE       3<br> #define PTRACE_EVENT_FORK        1<br> #define PTRACE_EVENT_VFORK       2<br> #define PTRACE_EVENT_VFORK_DONE  5<br> #define PTRACE_EVENT_EXEC        4<br> #define PTRACE_EVENT_EXIT        6</p>
<p> #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))</p>
<p> int main(int argc, char* argv[])<br> {</p>
<pre><code>static const char *const event_names[] = {
    [PTRACE_EVENT_CLONE] = &quot;CLONE&quot;,
    [PTRACE_EVENT_FORK]  = &quot;FORK&quot;,
    [PTRACE_EVENT_VFORK] = &quot;VFORK&quot;,
    [PTRACE_EVENT_VFORK_DONE] = &quot;VFORK_DONE&quot;,
    [PTRACE_EVENT_EXEC]  = &quot;EXEC&quot;,
    [PTRACE_EVENT_EXIT]  = &quot;EXIT&quot;,
};

int i=0; 
for (i=0; i&lt;ARRAY_SIZE(event_names); i++)
    printf(&quot;event_name[%d] = %s\n&quot;, i, event_names[i]);
return 0;
</code></pre><p> }</p>
</li>
<li><p>Arrays of Length Zero </p>
<p> #include <stdlib.h><br> #include <string.h></string.h></stdlib.h></p>
<p> struct line {</p>
<pre><code>int length;
char contents[0]; // C99的玩法是：char contents[]; 没有指定数组长度
</code></pre><p> };</p>
<p> int main(){</p>
<pre><code>int this_length=10;
struct line *thisline = (struct line *)
                 malloc (sizeof (struct line) + this_length);
thisline-&gt;length = this_length;
memset(thisline-&gt;contents, &apos;a&apos;, this_length);
free(thisline);
return 0;
</code></pre><p> }</p>
</li>
</ol>
<p>##2. point</p>
<h3 id="2-1-void-test-char-a"><a href="#2-1-void-test-char-a" class="headerlink" title="2.1 void test(char *a)"></a>2.1 void test(char *a)</h3><pre><code>if want to change the value, use this.
</code></pre><h3 id="2-2-void-test-char-a"><a href="#2-2-void-test-char-a" class="headerlink" title="2.2 void test(char **a)"></a>2.2 void test(char **a)</h3><pre><code>if want to allocate memory, use this.
</code></pre><p>##3. structure</p>
<h3 id="3-1-initial-by-bit"><a href="#3-1-initial-by-bit" class="headerlink" title="3.1 initial by bit"></a>3.1 initial by bit</h3><pre><code>struct pid_tag {
    unsigned int inactive : 1;
    unsigned int          : 1; /* fill 1 bit */
    unsigned int refcount : 6;
    unsigned int          : 0; /* fill to next word */
    short pid_id;
    struct pid_tag *link;
}
</code></pre><h3 id="3-2-alignment"><a href="#3-2-alignment" class="headerlink" title="3.2 alignment"></a>3.2 alignment</h3><pre><code>struct st_a {
    int a;
    char b;
    short c;
};

struct st_b {
    char b;
    short c;
    int a;
};

struct st_c {
    char b;
    int a;
    short c;
};

the value of sizeof(st_a) is 8  (address: 0 1 2 3 | 4 . | 6 7)
the value of sizeof(st_b) is 8  (address: 0 . | 2 3 | 4 5 6 7)
the value of sizeof(st_c) is 12 (address: 0 . . . | 4 5 6 7 | 8 9 . .)
</code></pre><p>Therefore, you should careful for doing structure copy, and socket programming.</p>
<p>##4. Function</p>
<h1 id="For-more"><a href="#For-more" class="headerlink" title="For more :"></a>For more :</h1><ul>
<li><a href="http://c-faq.com/index.html" target="_blank" rel="external">comp.lang.c Frequently Asked Questions</a></li>
<li><a href="ftp://rtfm.mit.edu/pub/usenet-by-group/news.answers/C-faq/faq" target="_blank" rel="external">C-FAQ</a></li>
<li><a href="http://stackoverflow.com/questions/tagged/c?sort=votes&amp;pagesize=15" target="_blank" rel="external">Top votes of c questions on stackoverflow</a></li>
<li><a href="http://coolshell.cn/articles/4102.html" target="_blank" rel="external">如何学好C语言</a></li>
<li><a href="http://coolshell.cn/articles/945.html" target="_blank" rel="external">C语言的谜题</a></li>
<li><a href="http://coolshell.cn/articles/873.html" target="_blank" rel="external">谁说C语言很简单？</a></li>
<li><a href="http://stackoverflow.com/questions/6893285/why-do-all-these-crazy-function-pointer-definitions-all-work-what-is-really-goi" target="_blank" rel="external">Why do all these crazy function pointer definitions all work? What is really going on?</a></li>
<li><a href="http://programmers.stackexchange.com/questions/62502/small-c-projects" target="_blank" rel="external">small c project</a></li>
<li><a href="http://blog.csdn.net/zhaori/article/details/7659268" target="_blank" rel="external">结构体内存对齐</a></li>
<li><a href="http://bbs.chinaunix.net/thread-480691-1-1.html" target="_blank" rel="external">二维数组做函数参数的问题</a></li>
<li><a href="http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html" target="_blank" rel="external">Arrays of Length Zero</a></li>
<li><a href="http://coolshell.cn/articles/11377.html" target="_blank" rel="external">C语言结构体里的成员数组和指针</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/05/07/do-you-really-master-c-language/" data-id="ciqqpe1jr004tnmpvbv5x0391" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/c/">c</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-my-favour-website" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/04/29/my-favour-website/" class="article-date">
  <time datetime="2013-04-28T16:00:00.000Z" itemprop="datePublished">2013-04-29</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/person/">person</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/04/29/my-favour-website/">my favour website</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="Read"><a href="#Read" class="headerlink" title="Read"></a>Read</h3><ul>
<li><a href="https://medium.com/" target="_blank" rel="external">medium</a></li>
</ul>
<h3 id="math"><a href="#math" class="headerlink" title="math"></a>math</h3><ul>
<li><a href="http://www.wolframalpha.com/" target="_blank" rel="external">Wolfram</a></li>
<li><a href="http://bbs.emath.ac.cn/" target="_blank" rel="external">数学研发论坛 (bbs.emath.ac.cn)</a></li>
<li><a href="http://mathworld.wolfram.com/" target="_blank" rel="external">Wolfram MathWorld: The Web&#39;s Most Extensive Mathematics Resource</a></li>
<li><a href="http://www.matrix67.com/blog/" target="_blank" rel="external">Matrix67: My Blog</a></li>
<li><a href="http://acm.timus.ru/" target="_blank" rel="external">Timus Online Judge</a></li>
<li><a href="http://poj.org/" target="_blank" rel="external">Welcome To PKU JudgeOnline</a></li>
<li><a href="http://projecteuler.net/" target="_blank" rel="external">Project Euler</a></li>
</ul>
<h3 id="blog-en"><a href="#blog-en" class="headerlink" title="blog_en"></a>blog_en</h3><ul>
<li><a href="http://jacquesmattheij.com/" target="_blank" rel="external">jacquesmattheij.com</a></li>
<li><a href="http://paultyma.blogspot.com/" target="_blank" rel="external">Paul Tyma</a></li>
<li><a href="http://readthisblog.net/#" target="_blank" rel="external">Read This Blog!</a></li>
<li><a href="http://googlecode.blogspot.com/" target="_blank" rel="external">The official Google Code blog</a></li>
<li><a href="http://blog.guykawasaki.com/" target="_blank" rel="external">blog.guykawasaki.com</a></li>
<li><a href="http://paultyma.blogspot.com/2010/11/google-interviewing-story.html" target="_blank" rel="external">Paul Tyma: A Google Interviewing Story</a></li>
<li><a href="http://www.codinghorror.com/blog/" target="_blank" rel="external">Coding Horror</a></li>
<li><a href="http://www.stallman.org/" target="_blank" rel="external">Richard Stallman&#39;s Personal Page</a></li>
<li><a href="http://www.linkedin.com/in/gaylel" target="_blank" rel="external">Gayle Laakmann </a></li>
<li><a href="http://blogs.forbes.com/ciocentral/2011/03/08/10-secrets-to-getting-a-job-at-apple-google-or-microsoft/" target="_blank" rel="external">10 Secrets To Getting A Job At Apple, Google Or Microsoft - CIO Central - CIO Network - Forbes</a></li>
<li><a href="http://www.skorks.com/" target="_blank" rel="external">Skorks</a></li>
<li><a href="http://www.joelonsoftware.com/" target="_blank" rel="external">Joel on Software</a></li>
<li><a href="http://norvig.com/" target="_blank" rel="external">Peter Norvig</a></li>
<li><a href="http://mike.pirnat.com/" target="_blank" rel="external">Mike Pirnat</a></li>
<li><a href="http://www.catb.org/~esr/" target="_blank" rel="external">Eric S. Raymond&#39;s Home Page</a></li>
<li><a href="http://www.alcyone.com/" target="_blank" rel="external">Alcyone Systems</a></li>
<li><a href="http://www.daedalus.nu/" target="_blank" rel="external">Daedalus Projects</a></li>
<li><a href="http://tmd.havit.cz/" target="_blank" rel="external">Homepage</a></li>
<li><a href="http://thinkvitamin.com/code/what-makes-a-great-programmer/" target="_blank" rel="external">What Makes A Great Programmer? </a></li>
</ul>
<h3 id="blog-cn"><a href="#blog-cn" class="headerlink" title="blog_cn"></a>blog_cn</h3><ul>
<li><a href="http://coolshell.cn/" target="_blank" rel="external">酷壳 – CoolShell.cn</a></li>
<li><a href="http://www.aqee.net/" target="_blank" rel="external">外刊IT评论</a></li>
<li><a href="http://software.intel.com/zh-cn/blogs/" target="_blank" rel="external">英特尔® 软件网络博客</a></li>
<li><a href="http://www.jobbole.com/blog.php" target="_blank" rel="external">伯乐在线 </a></li>
</ul>
<h3 id="news"><a href="#news" class="headerlink" title="news"></a>news</h3><ul>
<li><a href="http://news.ycombinator.com/news" target="_blank" rel="external">Hacker News</a></li>
<li><a href="http://www.reddit.com/" target="_blank" rel="external">reddit: the front page of the internet</a></li>
<li><a href="http://slashdot.org/" target="_blank" rel="external">Slashdot: News for nerds, stuff that matters</a></li>
<li><a href="http://solidot.org/" target="_blank" rel="external">Solidot: 奇客的资讯，重要的东西</a></li>
<li><a href="http://digg.com/" target="_blank" rel="external">Digg - All Topics - The Latest News Headlines, Videos and Images</a></li>
</ul>
<h3 id="site"><a href="#site" class="headerlink" title="site"></a>site</h3><ul>
<li><a href="http://www.codeproject.com/#" target="_blank" rel="external">CodeProject - Your Development Resource</a></li>
<li><a href="http://linuxtoy.org/" target="_blank" rel="external">LinuxTOY</a></li>
<li><a href="http://ocw.mit.edu/index.htm" target="_blank" rel="external">MIT OpenCourseWare</a></li>
<li><a href="http://www.thegeekstuff.com/" target="_blank" rel="external">The Geek Stuff</a></li>
</ul>
<h3 id="edu"><a href="#edu" class="headerlink" title="edu"></a>edu</h3><ul>
<li><a href="http://scpd.stanford.edu/publicViewHome.do?method=load" target="_blank" rel="external">Stanford University Online</a></li>
<li><a href="http://stackoverflow.com/questions/1711/what is the single most influential book every programmer should read?tab=votes#tab top" target="_blank" rel="external">what is the single most influential book every programmer should read</a></li>
<li><a href="http://www.codecademy.com/zh/#!/exercises/0" target="_blank" rel="external">Codecademy</a></li>
</ul>
<h3 id="blog"><a href="#blog" class="headerlink" title="blog"></a>blog</h3><ul>
<li><a href="http://www.u148.net/" target="_blank" rel="external">有意思吧 - 分享·情怀·超越 ，不仅仅是娱乐！</a></li>
<li><a href="http://www.boston.com/bigpicture/" target="_blank" rel="external">The Big Picture - Boston.com</a></li>
<li><a href="http://jandan.net/" target="_blank" rel="external">煎蛋：地球上没有新鲜事</a></li>
<li><a href="http://songshuhui.net/" target="_blank" rel="external">科学松鼠会 :: 让我们剥开科学的坚果</a></li>
<li><a href="http://drawn.ca/archive/" target="_blank" rel="external">Drawn! The Illustration and Cartooning Blog</a></li>
<li><a href="http://www.livdig.com/" target="_blank" rel="external">Livdig - 每個主題都能讓您發現、分享、及收藏有趣的人和事物！I dig my life!</a></li>
<li><a href="http://www.mitbbs.com/" target="_blank" rel="external">mitbbs</a></li>
<li><a href="http://blog.sina.com.cn/twocold" target="_blank" rel="external">韩寒_新浪博客</a></li>
<li><a href="http://www.fmylife.com/" target="_blank" rel="external">FML: Your everyday life stories</a></li>
<li><a href="http://blogs.forbes.com/" target="_blank" rel="external">Forbes</a></li>
<li><a href="https://www.tumblr.com/" target="_blank" rel="external">Tumblr</a></li>
</ul>
<h3 id="IQ"><a href="#IQ" class="headerlink" title="IQ"></a>IQ</h3><ul>
<li><a href="http://www.mensa.org/" target="_blank" rel="external">Mensa International</a></li>
<li><a href="https://www.mensa.org.hk/Pages/top.htm" target="_blank" rel="external">Hong Kong Mensa</a></li>
<li><a href="http://www.marilynvossavant.com/index.php" target="_blank" rel="external">Marilyn vos Savant</a></li>
<li><a href="http://www.iqtest.dk/main.swf" target="_blank" rel="external">www.iqtest.dk/main.swf</a></li>
<li><a href="http://www.mensa.org/workout/quiz/1" target="_blank" rel="external">Mensa International</a></li>
</ul>
<h3 id="music"><a href="#music" class="headerlink" title="music"></a>music</h3><ul>
<li><a href="http://www.songtaste.com/" target="_blank" rel="external">SongTaste 用音乐倾听彼此</a></li>
<li><a href="http://kxt.fm/" target="_blank" rel="external">邻居的耳朵</a></li>
<li><a href="www.cradio.cn">龙卷风收音机</a></li>
</ul>
<h3 id="photo"><a href="#photo" class="headerlink" title="photo"></a>photo</h3><ul>
<li><a href="http://www.boston.com/bigpicture/" target="_blank" rel="external">The Big Picture - Boston.com</a></li>
<li><a href="http://yowayowacamera.com/" target="_blank" rel="external">よわよわカメラウーマン日記</a></li>
</ul>
<h3 id="site-1"><a href="#site-1" class="headerlink" title="site"></a>site</h3><ul>
<li><a href="http://www.guokr.com/" target="_blank" rel="external">果壳网</a></li>
<li><a href="http://www.newscientist.com/" target="_blank" rel="external">New Scientist</a></li>
<li><a href="http://www.linkedin.com/" target="_blank" rel="external">LinkedIn</a></li>
<li><a href="http://www.businessinsider.com/" target="_blank" rel="external">Business Insider</a></li>
</ul>
<h3 id="cycling"><a href="#cycling" class="headerlink" title="cycling"></a>cycling</h3><ul>
<li><a href="www.doyouhike.net/">磨房</a></li>
<li><a href="www.117go.com">在路上</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/04/29/my-favour-website/" data-id="ciqqpe1jn004qnmpvwst094i8" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/person/">person</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-opennebula" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/04/28/opennebula/" class="article-date">
  <time datetime="2013-04-27T16:00:00.000Z" itemprop="datePublished">2013-04-28</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/linux/">linux</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/04/28/opennebula/">opennebula</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>Reference:</p>
<ul>
<li><a href="http://opennebula.org/start" target="_blank" rel="external">OpenNebula</a></li>
<li><a href="http://en.wikipedia.org/wiki/OpenNebula" target="_blank" rel="external">OpenNebula wikipedia</a></li>
<li><a href="http://trac.nchc.org.tw/grid/wiki/KVM/OpenNebula" target="_blank" rel="external">KVM + OpenNebula = Virtual Cluster Deployment</a></li>
<li><a href="http://opennebula.org/documentation:rel3.8:kvmg" target="_blank" rel="external">KVM Driver 3.8</a></li>
<li><a href="http://blog.sina.com.cn/s/blog_6530ad590100gwxf.html" target="_blank" rel="external">OpenNEbula 中文介绍</a></li>
<li><a href="http://blog.csdn.net/ustc_dylan/article/details/8185821" target="_blank" rel="external">opennebula虚拟机创建流程图 </a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/04/28/opennebula/" data-id="ciqqpe1jh004nnmpvrs3526y2" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/virtual/">virtual</a></li></ul>

    </footer>
  </div>
  
</article>


  
    <article id="post-nodejs" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/04/28/nodejs/" class="article-date">
  <time datetime="2013-04-27T16:00:00.000Z" itemprop="datePublished">2013-04-28</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/language/">language</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2013/04/28/nodejs/">node.js</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="Install-Node-js"><a href="#Install-Node-js" class="headerlink" title="Install Node.js"></a>Install Node.js</h2><p><code>wget http://nodejs.org/dist/v0.10.5/node-v0.10.5.tar.gz</code></p>
<pre><code>./configure
make
make Install
</code></pre><h2 id="Create-a-http-webserver"><a href="#Create-a-http-webserver" class="headerlink" title="Create a http webserver"></a>Create a http webserver</h2><h2 id="Awesome-tools-use-node"><a href="#Awesome-tools-use-node" class="headerlink" title="Awesome tools use node"></a>Awesome tools use node</h2><ul>
<li><a href="http://pdfkit.org/index.html" target="_blank" rel="external">PDFKit</a></li>
</ul>
<p>pdftest.js (run command <code>node pdftest.js</code>)</p>
<pre><code>var PDFDocument = require(&apos;pdfkit&apos;), 
doc = new PDFDocument();

doc.moveTo(300, 75)
   .lineTo(373, 301)
   .lineTo(181, 161)
   .lineTo(419, 161)
   .lineTo(227, 301)
   .fill(&apos;red&apos;, &apos;even-odd&apos;); 

var loremIpsum = &apos;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in...&apos;;

doc.y = 320;
doc.fillColor(&apos;black&apos;)
   .text(loremIpsum, {
       paragraphGap: 10,
       indent: 20,
       align: &apos;justify&apos;,
       columns: 2
   });

doc.write(&apos;out.pdf&apos;);
</code></pre><ul>
<li><a href="http://bartaz.github.io/impress.js/#/bored" target="_blank" rel="external">Impress.js</a>,<br><a href="https://github.com/bartaz/impress.js/" target="_blank" rel="external">source code</a></li>
</ul>
<h2 id="Referece"><a href="#Referece" class="headerlink" title="Referece"></a>Referece</h2><ul>
<li><a href="https://github.com/joyent/node/wiki" target="_blank" rel="external">The Wiki</a></li>
<li><a href="http://nodejs.org/" target="_blank" rel="external">nodejs.org</a></li>
<li><a href="http://www.nodebeginner.org/" target="_blank" rel="external">The Node Beginner Book</a></li>
<li><a href="http://www.nodebeginner.org/index-zh-cn.html" target="_blank" rel="external">Node入门★★★</a></li>
<li><a href="http://debuggable.com/posts/understanding-node-js:4bd98440-45e4-4a9a-8ef7-0f7ecbdd56cb" target="_blank" rel="external">Understanding node.js</a></li>
<li><a href="https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node" target="_blank" rel="external">Projects, Applications, and Companies Using Node</a></li>
<li><a href="http://blog.nodeknockout.com/post/9134350698/countdown-to-ko-8-introduction-to-pdfkit" target="_blank" rel="external">Introduction to PDFKit</a></li>
<li><a href="http://cnodejs.org/topic/4f16442ccae1f4aa27001135" target="_blank" rel="external">简单介绍并实现一个简单的Web MVC框架</a></li>
<li><a href="http://joyeur.com/2010/12/10/installing-node-and-npm/" target="_blank" rel="external">how to install node.js and npm (node package manager)</a></li>
<li><a href="https://github.com/joyent/node/wiki/modules" target="_blank" rel="external">list of modules</a></li>
<li><a href="https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node" target="_blank" rel="external">list of companies and projects using node</a></li>
<li><a href="http://groups.google.com/group/nodejs" target="_blank" rel="external">node.js mailing list</a></li>
<li><a href="https://github.com/joyent/node/wiki/Community" target="_blank" rel="external">community</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/04/28/nodejs/" data-id="ciqqpe1ja004knmpvbqvwnwhu" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/javascript/">javascript</a></li></ul>

    </footer>
  </div>
  
</article>


  


  <nav id="page-nav">
    <a class="extend prev" rel="prev" href="/page/12/">&laquo; __('prev')</a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/11/">11</a><a class="page-number" href="/page/12/">12</a><span class="page-number current">13</span><a class="page-number" href="/page/14/">14</a><a class="page-number" href="/page/15/">15</a><span class="space">&hellip;</span><a class="page-number" href="/page/18/">18</a><a class="extend next" rel="next" href="/page/14/">__('next') &raquo;</a>
  </nav>
</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Catégories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/blog/">blog</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/database/">database</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/english/">english</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/kernel/">kernel</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/language/">language</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/linux/">linux</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/math/">math</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/network/">network</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/others/">others</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/person/">person</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/program/">program</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/source/">source</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/storage/">storage</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/tools/">tools</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/windows/">windows</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Mot-clés</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/FAQ/">FAQ</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/IRC/">IRC</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Translation/">Translation</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/android/">android</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/api/">api</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/assembly/">assembly</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/awk/">awk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/batch/">batch</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/blog/">blog</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/book/">book</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cache/">cache</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/crash/">crash</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/database/">database</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/debug/">debug</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/dot/">dot</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/driver/">driver</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/emacs/">emacs</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/exploit/">exploit</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/file-system/">file system</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/filesystem/">filesystem</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/flowchart/">flowchart</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gcc/">gcc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/google/">google</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/graphviz/">graphviz</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hosts/">hosts</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/iscsi/">iscsi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/javascript/">javascript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/job/">job</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/json/">json</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kernel/">kernel</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lisp/">lisp</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lua/">lua</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/makefile/">makefile</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/malloc/">malloc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/math/">math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/maxima/">maxima</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory/">memory</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory-overflow/">memory overflow</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mtrace/">mtrace</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/netdisk/">netdisk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/network/">network</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/others/">others</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/pandoc/">pandoc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/performance/">performance</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/person/">person</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/">protobuf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rsync/">rsync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sed/">sed</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/shell/">shell</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/skype/">skype</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sms/">sms</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/source/">source</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ssh/">ssh</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/stack/">stack</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/storage/">storage</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/study/">study</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/svn/">svn</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sync/">sync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/time/">time</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/tools/">tools</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/valgrind/">valgrind</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vi/">vi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/virtual/">virtual</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wget/">wget</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/windows/">windows</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wireshark/">wireshark</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/write/">write</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/xml/">xml</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Nuage de mot-clés</h3>
    <div class="widget tagcloud">
      <a href="/tags/FAQ/" style="font-size: 10px;">FAQ</a> <a href="/tags/IRC/" style="font-size: 10px;">IRC</a> <a href="/tags/Translation/" style="font-size: 13px;">Translation</a> <a href="/tags/android/" style="font-size: 10px;">android</a> <a href="/tags/api/" style="font-size: 10px;">api</a> <a href="/tags/assembly/" style="font-size: 10px;">assembly</a> <a href="/tags/awk/" style="font-size: 11px;">awk</a> <a href="/tags/batch/" style="font-size: 14px;">batch</a> <a href="/tags/blog/" style="font-size: 10px;">blog</a> <a href="/tags/book/" style="font-size: 10px;">book</a> <a href="/tags/c/" style="font-size: 16px;">c</a> <a href="/tags/c/" style="font-size: 19px;">c++</a> <a href="/tags/cache/" style="font-size: 10px;">cache</a> <a href="/tags/crash/" style="font-size: 10px;">crash</a> <a href="/tags/database/" style="font-size: 17px;">database</a> <a href="/tags/debug/" style="font-size: 12px;">debug</a> <a href="/tags/dot/" style="font-size: 10px;">dot</a> <a href="/tags/driver/" style="font-size: 10px;">driver</a> <a href="/tags/emacs/" style="font-size: 11px;">emacs</a> <a href="/tags/exploit/" style="font-size: 10px;">exploit</a> <a href="/tags/file-system/" style="font-size: 10px;">file system</a> <a href="/tags/filesystem/" style="font-size: 12px;">filesystem</a> <a href="/tags/flowchart/" style="font-size: 10px;">flowchart</a> <a href="/tags/gcc/" style="font-size: 10px;">gcc</a> <a href="/tags/git/" style="font-size: 12px;">git</a> <a href="/tags/google/" style="font-size: 11px;">google</a> <a href="/tags/graphviz/" style="font-size: 11px;">graphviz</a> <a href="/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/tags/hosts/" style="font-size: 10px;">hosts</a> <a href="/tags/iscsi/" style="font-size: 14px;">iscsi</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/javascript/" style="font-size: 10px;">javascript</a> <a href="/tags/job/" style="font-size: 10px;">job</a> <a href="/tags/json/" style="font-size: 10px;">json</a> <a href="/tags/kernel/" style="font-size: 14px;">kernel</a> <a href="/tags/linux/" style="font-size: 14px;">linux</a> <a href="/tags/lisp/" style="font-size: 10px;">lisp</a> <a href="/tags/lua/" style="font-size: 10px;">lua</a> <a href="/tags/makefile/" style="font-size: 10px;">makefile</a> <a href="/tags/malloc/" style="font-size: 10px;">malloc</a> <a href="/tags/math/" style="font-size: 11px;">math</a> <a href="/tags/maxima/" style="font-size: 10px;">maxima</a> <a href="/tags/memory/" style="font-size: 11px;">memory</a> <a href="/tags/memory-overflow/" style="font-size: 10px;">memory overflow</a> <a href="/tags/mtrace/" style="font-size: 10px;">mtrace</a> <a href="/tags/netdisk/" style="font-size: 10px;">netdisk</a> <a href="/tags/network/" style="font-size: 20px;">network</a> <a href="/tags/others/" style="font-size: 18px;">others</a> <a href="/tags/pandoc/" style="font-size: 10px;">pandoc</a> <a href="/tags/performance/" style="font-size: 16px;">performance</a> <a href="/tags/person/" style="font-size: 11px;">person</a> <a href="/tags/protobuf/" style="font-size: 11px;">protobuf</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/rsync/" style="font-size: 10px;">rsync</a> <a href="/tags/sed/" style="font-size: 11px;">sed</a> <a href="/tags/shell/" style="font-size: 15px;">shell</a> <a href="/tags/skype/" style="font-size: 11px;">skype</a> <a href="/tags/sms/" style="font-size: 10px;">sms</a> <a href="/tags/source/" style="font-size: 11px;">source</a> <a href="/tags/ssh/" style="font-size: 10px;">ssh</a> <a href="/tags/stack/" style="font-size: 10px;">stack</a> <a href="/tags/storage/" style="font-size: 15px;">storage</a> <a href="/tags/study/" style="font-size: 10px;">study</a> <a href="/tags/svn/" style="font-size: 11px;">svn</a> <a href="/tags/sync/" style="font-size: 10px;">sync</a> <a href="/tags/test/" style="font-size: 11px;">test</a> <a href="/tags/time/" style="font-size: 10px;">time</a> <a href="/tags/tools/" style="font-size: 16px;">tools</a> <a href="/tags/valgrind/" style="font-size: 10px;">valgrind</a> <a href="/tags/vi/" style="font-size: 10px;">vi</a> <a href="/tags/vim/" style="font-size: 14px;">vim</a> <a href="/tags/virtual/" style="font-size: 11px;">virtual</a> <a href="/tags/wget/" style="font-size: 10px;">wget</a> <a href="/tags/windows/" style="font-size: 11px;">windows</a> <a href="/tags/wireshark/" style="font-size: 10px;">wireshark</a> <a href="/tags/write/" style="font-size: 13px;">write</a> <a href="/tags/xml/" style="font-size: 10px;">xml</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">July 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">April 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">March 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">February 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">October 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">September 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">August 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/07/">July 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">June 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/03/">March 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/02/">February 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/01/">January 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/12/">December 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/11/">November 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/09/">September 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/08/">August 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/07/">July 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/06/">June 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/05/">May 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/04/">April 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/03/">March 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/11/">November 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/10/">October 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/09/">September 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/08/">August 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/07/">July 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/06/">June 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/05/">May 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/04/">April 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/03/">March 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/02/">February 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/01/">January 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/12/">December 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/09/">September 2012</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Articles récents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/07/17/how-to-implement-malloc/">如何实现一个malloc</a>
          </li>
        
          <li>
            <a href="/2016/07/17/study-grep-more/">grep工作原理</a>
          </li>
        
          <li>
            <a href="/2016/07/17/2016-04-13-malloc/">malloc</a>
          </li>
        
          <li>
            <a href="/2016/04/27/include-what-you-use/">使用IWYU整理头文件引用</a>
          </li>
        
          <li>
            <a href="/2016/04/24/understand-gcc-assembly-output/">understand gcc assembly output</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2016 Matrix207<br>
      Propulsé by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>